home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
Other Langs
/
MacPerl ƒ
/
Perl Source ƒ
/
MacPerl
/
MPAppleEvents.h
< prev
next >
Wrap
Text File
|
1994-01-02
|
3KB
|
99 lines
/*********************************************************************
Project : MacPerl - Real Perl Application
File : MPAppleEvents.h -
Author : Matthias Neeracher
A lot of this code is borrowed from 7Edit written by
Apple Developer Support UK
Started : 17Mar93 Language : MPW C
Modified : 17Mar93 MN
29May93 MN Compiles correctly
30May93 MN Support Console Windows
28Aug93 MN IssueFormatCommand
Last : 28Aug93
*********************************************************************/
#ifndef __MPAPPLEEVENTS__
#define __MPAPPLEEVENTS__
#include <Types.h>
#include <QuickDraw.h>
#include <Packages.h>
#include <GestaltEqu.h>
#include <Editions.h>
#include <Printing.h>
#include <AppleEvents.h>
#ifndef __MPGLOBALS__
#include <MPGlobals.h>
#endif
enum {
ETX = 0x03, /* Enter key on keyboard or keypad */
BS = 0x08, /* Backspace key on keyboard */
HT = 0x09, /* Tab key on keyboard */
CR = 0x0D, /* Return key on keyboard */
ESC = 0x1B, /* Clear key on keypad */
FS = 0x1C, /* Left arrow key on keypad */
GS = 0x1D, /* Right arrow key on keypad */
RS = 0x1E, /* Up arrow key on keypad */
US = 0x1F /* Down arrow key on keypad */
};
pascal Boolean AllSelected(TEHandle te);
pascal void InitAppleEvents(void);
pascal void DoAppleEvent(EventRecord theEvent);
#ifndef RUNTIME
pascal OSErr MakeSelfAddress(AEAddressDesc *selfAddress);
#endif
/*
Text Commands
*/
pascal void IssueCutCommand(DPtr theDocument);
pascal void IssueCopyCommand(DPtr theDocument);
pascal void IssuePasteCommand(DPtr theDocument);
pascal void IssueClearCommand(DPtr theDocument);
pascal void IssueFormatCommand(DPtr theDocument);
/*
Window Commands
*/
pascal void IssueZoomCommand(WindowPtr whichWindow, short whichPart);
pascal void IssueCloseCommand(WindowPtr whichWindow);
pascal void IssueSizeWindow(WindowPtr whichWindow, short newHSize,short newVSize);
pascal void IssueMoveWindow(WindowPtr whichWindow, Rect sizeRect);
pascal void IssuePageSetupWindow(WindowPtr whichWindow, TPrint thePageSetup);
pascal void IssueShowBorders(WindowPtr whichWindow, Boolean showBorders);
pascal void IssuePrintWindow(WindowPtr whichWindow);
/*
Document Commands
*/
pascal OSErr IssueAEOpenDoc(FSSpec myFSSpec);
pascal void IssueAENewWindow(void);
pascal OSErr IssueSaveCommand(WindowPtr theWindow, FSSpecPtr where);
pascal OSErr IssueRevertCommand(WindowPtr theWindow);
pascal OSErr IssueQuitCommand(void);
#ifndef RUNTIME
pascal void IssueCreatePublisher(DPtr whichDoc);
#endif
pascal void EnforceMemory(DPtr theDocument, TEHandle theHTE);
#ifndef RUNTIME
/*
Recording of Keystrokes
*/
pascal void AddKeyToTypingBuffer(DPtr theDocument, char theKey);
pascal void FlushAndRecordTypingBuffer(void);
#endif
#endif